function nicegraph = nicegraph(parms)
% output graph for beliefs
stop = false; % This function does not stop the solver
%switch state
 %   case 'init'
        
        setup_states;

        beliefparms.theta=parms(3:9);
        beliefparms.gamma=parms(10);
        beliefparms.gamma_mod=parms(2); % only for robustness

         %theta=parms(3:end-4);
         %gamma=parms(end-3);
    
         fixedparms.ind_goodgirl=1;
         pi = makepi(states,fixedparms,beliefparms);
         fixedparms.ind_goodgirl=0;
         pi_bad = makepi(states,fixedparms,beliefparms);
        
     figure;
for e = 7:13
    if e==13
        mark = 'diamond';
    elseif e==12
        mark = 'o';
    elseif e==11
        mark = 'x';
    elseif e==10
        mark = 'square';
    elseif e==9 
        mark = '*';
    elseif e==8
        mark = '^';
    else
        mark='none';
    end
     f = find(states(:,2)==e);
     plot(states(f, 1), pi(f, 2),'LineWidth',1.5, 'Marker', mark, ...
         'Color', (1 - (1/14)*e)*[1 1 1], 'MarkerEdgeColor', (1 - (1/14)*e)*[1 1 1], ...
         'MarkerFaceColor', (1 - (1/14)*e)*[1 1 1]);
     hold on
end

for e = 7:13
     f = find(states(:,2)==e);
     plot(states(f, 1), pi_bad(f, 2),'--','LineWidth',1.5,'Color', (1 - (1/14)*e)*[1 1 1]);
     hold on
end

set(gca, 'FontSize', 14)
set(gca,'FontName','Times')

xlabel("Age", 'FontSize', 14)
ylabel("Probability of High Offer", 'FontSize', 14)
axis([12 22 0 0.42])
legend("Grade 7","Grade 8","Grade 9","Grade 10","Grade 11", ...
            "Grade 12","College","Break Norms", 'Location','northwest')
hold off
    
    drawnow
    
    
    end